diff --git a/plugin/Gallery/view/modeGalleryCategory.php b/plugin/Gallery/view/modeGalleryCategory.php index 244745c83..66162df79 100644 --- a/plugin/Gallery/view/modeGalleryCategory.php +++ b/plugin/Gallery/view/modeGalleryCategory.php @@ -1,72 +1,78 @@ CategoriesShowOnlySuggested; +if(!empty(getSearchVar())){ + $onlySuggested = false; +} + +$categories = Category::getAllCategories(false, true, $onlySuggested); +$total = Category::getTotalCategories(false, true, $onlySuggested); $totalPages = ceil($total / getRowCount()); $page = getCurrentPage(); if ($totalPages < $page) { $page = $totalPages; } $link = "{$global['webSiteRootURL']}plugin/Gallery/view/modeGalleryCategory.php?tags_id=" . intval(@$_GET['tagsid']) . "&search=" . htmlentities(urlencode(getSearchVar())) . "¤t={page}"; if (empty($categories)) { return false; } $_REQUEST['current'] = 1; $_REQUEST['rowCount'] = $obj->CategoriesRowCount; ?>